package org.msd.controller;
import org.msd.model.Persohaldetails;
import org.msd.service.iml.PerohSerice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("personal")
public class Personalinformation {
    /*
    添加个人信息
     */
    @Autowired
    private PerohSerice perohSerice;
    @RequestMapping("formation")
    public String addPeronal(Model model, Persohaldetails persohaldetails){
     int  information=perohSerice.Insertpersonal(persohaldetails);
  if (information==1){
      model.addAttribute(" information","添加成功");
     return "forward:Test";
   }else{
     model.addAttribute(" information","添加失败重新输入");
  }
    return "Test";
    }
}
